package com.code.responsibility.cor;

import com.code.responsibility.handle.PriceHandler;

/**
 * <p>客户、请求折扣</p>
 *
 * @author hwf
 * @version 1.0
 * @date 2021/12/14 22:18
 */
public class Customer {

    private PriceHandler priceHandler;

    public void setPriceHandler(PriceHandler priceHandler) {
        this.priceHandler = priceHandler;
    }

    /**
     * 请求折扣
     *
     * @param discount
     */
    public void requestDiscount(float discount) {
        priceHandler.priceDiscount(discount);
    }
}
